<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>对象</title>
        <script>
          var obj = {
              id:1,
              username:'Tom',
              say:function(sth){
                  return '他说' + sth;
              }
          };
          console.log('用户ID' + obj.id);
          console.log('用户名' + obj.username);
          console.log(obj.say('大家好,中午吃了吗?'));
        </script>
    </head>
    <body>
    </body>
</html>



